Template Listener
The listener interface for receiving lifecycle and interaction events related to a Template instance.
A class that is interested in processing such template events implements this interface. An object created from that class (a listener instance) is then registered with the component that manages the template's lifecycle (e.g., a specific TemplateView
or a template controller) using a method like addTemplateListener(TemplateListener listener)
.
When a significant event occurs for the template (such as initialization, suspension, resumption, termination, or a user interaction like a click), the corresponding method in the registered listener object is invoked. This allows applications to react to changes in the template's state or to user interactions with the template.